﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Figure_Finder
{
	class Line2D
	{
		public Point2D V1, V2;

		public Line2D( Point2D v1, Point2D v2 )
		{
			if( v1 == null || v2 == null )
				throw new ArgumentNullException( "One of vertex is null." );

			this.V1 = v1;
			this.V2 = v2;
		}

		public double Len
		{
			get 
			{
				int dx = V1.X - V2.X;
				int dy = V1.Y - V2.Y;
				return Math.Sqrt(dx * dx + dy * dy); 
			}
		}
	}
}
